package sk.project.accounting.data.model;

// Generated Dec 17, 2012 9:50:06 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Customer generated by hbm2java
 */
@Entity
@Table(name = "customer", catalog = "skl_hosp_new")
public class Customer implements java.io.Serializable {

	private Integer id;
	private Country country;
	private String name;
	private String icdph;
	private String ico;
	private String dic;
	private String representative;
	private String businessActivity;
	private Date updated;
	private String vat;
	private String bank;
	private String bankAccountNumber;
	private String bankAccountPrefix;
	private String bankCode;
	private Set<Contact> contacts = new HashSet<Contact>(0);

	public Customer() {
	}

	public Customer(String name) {
		this.name = name;
	}

	public Customer(Country country, String name, String icdph, String ico,
			String dic, String representative, String businessActivity,
			Date updated, String vat, String bank, String bankAccountNumber,
			String bankAccountPrefix, String bankCode, Set<Contact> contacts) {
		this.country = country;
		this.name = name;
		this.icdph = icdph;
		this.ico = ico;
		this.dic = dic;
		this.representative = representative;
		this.businessActivity = businessActivity;
		this.updated = updated;
		this.vat = vat;
		this.bank = bank;
		this.bankAccountNumber = bankAccountNumber;
		this.bankAccountPrefix = bankAccountPrefix;
		this.bankCode = bankCode;
		this.contacts = contacts;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_country")
	public Country getCountry() {
		return this.country;
	}

	public void setCountry(Country country) {
		this.country = country;
	}

	@Column(name = "name", nullable = false, length = 200)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "icdph", length = 12)
	public String getIcdph() {
		return this.icdph;
	}

	public void setIcdph(String icdph) {
		this.icdph = icdph;
	}

	@Column(name = "ico", length = 8)
	public String getIco() {
		return this.ico;
	}

	public void setIco(String ico) {
		this.ico = ico;
	}

	@Column(name = "dic", length = 10)
	public String getDic() {
		return this.dic;
	}

	public void setDic(String dic) {
		this.dic = dic;
	}

	@Column(name = "representative", length = 200)
	public String getRepresentative() {
		return this.representative;
	}

	public void setRepresentative(String representative) {
		this.representative = representative;
	}

	@Column(name = "business_activity", length = 300)
	public String getBusinessActivity() {
		return this.businessActivity;
	}

	public void setBusinessActivity(String businessActivity) {
		this.businessActivity = businessActivity;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updated", length = 19)
	public Date getUpdated() {
		return this.updated;
	}

	public void setUpdated(Date updated) {
		this.updated = updated;
	}

	@Column(name = "vat", length = 5)
	public String getVat() {
		return this.vat;
	}

	public void setVat(String vat) {
		this.vat = vat;
	}

	@Column(name = "bank", length = 200)
	public String getBank() {
		return this.bank;
	}

	public void setBank(String bank) {
		this.bank = bank;
	}

	@Column(name = "bank_account_number", length = 200)
	public String getBankAccountNumber() {
		return this.bankAccountNumber;
	}

	public void setBankAccountNumber(String bankAccountNumber) {
		this.bankAccountNumber = bankAccountNumber;
	}

	@Column(name = "bank_account_prefix", length = 200)
	public String getBankAccountPrefix() {
		return this.bankAccountPrefix;
	}

	public void setBankAccountPrefix(String bankAccountPrefix) {
		this.bankAccountPrefix = bankAccountPrefix;
	}

	@Column(name = "bank_code", length = 200)
	public String getBankCode() {
		return this.bankCode;
	}

	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "customer")
	public Set<Contact> getContacts() {
		return this.contacts;
	}

	public void setContacts(Set<Contact> contacts) {
		this.contacts = contacts;
	}

}
